package com.itheima.controller;

import com.itheima.domain.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Autowired
    private Person person;

    @RequestMapping("/hello")
    public String hello() {

        System.out.println(person.getName());
        System.out.println(person.getAge());
        for (String address : person.getAddress()) {
            System.out.println(address);
        }
        return " hello Spring Boot !";
    }
}